home *** CD-ROM | disk | FTP | other *** search
/ Mac100% 1998 November / MAC100-1998-11.ISO.7z / MAC100-1998-11.ISO / オンラインソフト定点観測 / ユーティリティ / merryxmas Vaccine ト.sit / merryxmas Vaccine ƒ / merryxmas Vaccine 4.2 / background_2624.xml < prev    next >
Extensible Markup Language  |  1998-08-28  |  43KB  |  202 lines

  1. <?xml version="1.0" encoding="utf-8" ?>
  2. <!DOCTYPE background PUBLIC "-//Apple, Inc.//DTD background V 2.0//EN" "" >
  3. <background>
  4.     <id>2624</id>
  5.     <filler1>0</filler1>
  6.     <bitmap>BMAP_3609.pbm</bitmap>
  7.     <cantDelete> <true /> </cantDelete>
  8.     <showPict> <true /> </showPict>
  9.     <dontSearch> <false /> </dontSearch>
  10.     <link rel="stylesheet" type="text/css" href="stylesheet_3117.css" />
  11.     <part>
  12.         <id>1</id>
  13.         <type>field</type>
  14.         <visible> <true /> </visible>
  15.         <dontWrap> <false /> </dontWrap>
  16.         <dontSearch> <false /> </dontSearch>
  17.         <sharedText> <false /> </sharedText>
  18.         <fixedLineHeight> <false /> </fixedLineHeight>
  19.         <autoTab> <false /> </autoTab>
  20.         <lockText> <true /> </lockText>
  21.         <rect>
  22.             <left>10</left>
  23.             <top>10</top>
  24.             <right>502</right>
  25.             <bottom>228</bottom>
  26.         </rect>
  27.         <style>opaque</style>
  28.         <autoSelect> <false /> </autoSelect>
  29.         <showLines> <false /> </showLines>
  30.         <wideMargins> <true /> </wideMargins>
  31.         <multipleLines> <false /> </multipleLines>
  32.         <reservedFamily> 0 </reservedFamily>
  33.         <titleWidth>0</titleWidth>
  34.         <icon>0</icon>
  35.         <textAlign>left</textAlign>
  36.         <font>Geneva</font>
  37.         <textSize>12</textSize>
  38.         <textStyle>plain</textStyle>
  39.         <textHeight>16</textHeight>
  40.         <name>stacks</name>
  41.         <script></script>
  42.     </part>
  43.     <part>
  44.         <id>10</id>
  45.         <type>field</type>
  46.         <visible> <true /> </visible>
  47.         <dontWrap> <false /> </dontWrap>
  48.         <dontSearch> <false /> </dontSearch>
  49.         <sharedText> <false /> </sharedText>
  50.         <fixedLineHeight> <false /> </fixedLineHeight>
  51.         <autoTab> <false /> </autoTab>
  52.         <lockText> <true /> </lockText>
  53.         <rect>
  54.             <left>38</left>
  55.             <top>263</top>
  56.             <right>502</right>
  57.             <bottom>280</bottom>
  58.         </rect>
  59.         <style>opaque</style>
  60.         <autoSelect> <false /> </autoSelect>
  61.         <showLines> <false /> </showLines>
  62.         <wideMargins> <false /> </wideMargins>
  63.         <multipleLines> <false /> </multipleLines>
  64.         <reservedFamily> 0 </reservedFamily>
  65.         <titleWidth>0</titleWidth>
  66.         <icon>0</icon>
  67.         <textAlign>left</textAlign>
  68.         <font>Geneva</font>
  69.         <textSize>12</textSize>
  70.         <textStyle>plain</textStyle>
  71.         <textHeight>16</textHeight>
  72.         <name>status</name>
  73.         <script></script>
  74.     </part>
  75.     <part>
  76.         <id>23</id>
  77.         <type>button</type>
  78.         <visible> <true /> </visible>
  79.         <reserved5> 0 </reserved5>
  80.         <reserved4> 0 </reserved4>
  81.         <reserved3> 0 </reserved3>
  82.         <reserved2> 0 </reserved2>
  83.         <reserved1> 0 </reserved1>
  84.         <enabled> <true /> </enabled>
  85.         <rect>
  86.             <left>7</left>
  87.             <top>292</top>
  88.             <right>127</right>
  89.             <bottom>313</bottom>
  90.         </rect>
  91.         <style>rectangle</style>
  92.         <showName> <true /> </showName>
  93.         <highlight> <false /> </highlight>
  94.         <autoHighlight> <true /> </autoHighlight>
  95.         <sharedHighlight> <false /> </sharedHighlight>
  96.         <family>0</family>
  97.         <titleWidth>0</titleWidth>
  98.         <icon>0</icon>
  99.         <textAlign>center</textAlign>
  100.         <font>Times</font>
  101.         <textSize>14</textSize>
  102.         <textStyle>plain</textStyle>
  103.         <name>About This Stack</name>
  104.         <script>on mouseDownplay "click"end mouseDownon mouseUpplay "transporter"go cd "blank"visual effect dissolve very slowlygo cd "About"end mouseUp</script>
  105.     </part>
  106.     <part>
  107.         <id>24</id>
  108.         <type>button</type>
  109.         <visible> <true /> </visible>
  110.         <reserved5> 0 </reserved5>
  111.         <reserved4> 0 </reserved4>
  112.         <reserved3> 0 </reserved3>
  113.         <reserved2> 0 </reserved2>
  114.         <reserved1> 0 </reserved1>
  115.         <enabled> <true /> </enabled>
  116.         <rect>
  117.             <left>132</left>
  118.             <top>292</top>
  119.             <right>252</right>
  120.             <bottom>313</bottom>
  121.         </rect>
  122.         <style>rectangle</style>
  123.         <showName> <true /> </showName>
  124.         <highlight> <false /> </highlight>
  125.         <autoHighlight> <true /> </autoHighlight>
  126.         <sharedHighlight> <false /> </sharedHighlight>
  127.         <family>0</family>
  128.         <titleWidth>0</titleWidth>
  129.         <icon>0</icon>
  130.         <textAlign>center</textAlign>
  131.         <font>Times</font>
  132.         <textSize>14</textSize>
  133.         <textStyle>plain</textStyle>
  134.         <name>Preferences</name>
  135.         <script>on mouseDownplay "click"end mouseDownon mouseUpplay "Trek Door"go cd "Preferences"end mouseUp</script>
  136.     </part>
  137.     <part>
  138.         <id>25</id>
  139.         <type>button</type>
  140.         <visible> <true /> </visible>
  141.         <reserved5> 0 </reserved5>
  142.         <reserved4> 0 </reserved4>
  143.         <reserved3> 0 </reserved3>
  144.         <reserved2> 0 </reserved2>
  145.         <reserved1> 0 </reserved1>
  146.         <enabled> <true /> </enabled>
  147.         <rect>
  148.             <left>258</left>
  149.             <top>292</top>
  150.             <right>378</right>
  151.             <bottom>313</bottom>
  152.         </rect>
  153.         <style>rectangle</style>
  154.         <showName> <true /> </showName>
  155.         <highlight> <false /> </highlight>
  156.         <autoHighlight> <true /> </autoHighlight>
  157.         <sharedHighlight> <false /> </sharedHighlight>
  158.         <family>0</family>
  159.         <titleWidth>0</titleWidth>
  160.         <icon>0</icon>
  161.         <textAlign>center</textAlign>
  162.         <font>Times</font>
  163.         <textSize>14</textSize>
  164.         <textStyle>plain</textStyle>
  165.         <name>Disinfect Stacks</name>
  166.         <script>on mouseDownplay "click"end mouseDownon mouseUpglobal sweepMode, quarantine, okToCompact, lineNo, currentStack, ツャvolPath, bytesCompacted, infected, stillInfected, disinfectedStacks, ツャstillinfectedStacks, IDinfectedStacks, IDinfected, targit, subfolder, ツャsweepMode, okToInoculate, okToList, stackList, green, yellow, red, lowMemset cursor to "busy"lock screeninitialize  -- clear fields via handler in background scriptput empty into fld "stacks"hide btn "Print Report"hide btn "Save as text窶ヲ"-- clear the white holes left by the Print and Save buttonssend colorMe to this cdunlock screen-- select a stack, folder or volumeif targit is "Volume" thenput "Selecting volume to scan..." into fld "status"put fullsfpack(volume) into volPath  -- prompt for volume to operate onelse if targit is "Folder" thenput "Selecting folder to scan..." into fld "status"put fullsfpack(folder) into folPathput char 1 to offset(":",folPath) of folPath into volPathelseput "Selecting stack to scan..." into fld "status"answer file "Select a stack to examine" of type stackput it into stkPathput char 1 to offset(":",stkPath) of stkPath into volPathend ifset cursor to "busy"put empty into fld "status"-- test for selection being cancelledif volPath is empty thenput "No selection made. Procedure cancelled." into fld "status"exit mouseUpend if-- see if trying to disinfect a locked volumeif item 5 of GetVInfo(volPath) is true ツャ  -- if disk lockedand sweepMode is not "scan only" thenplay "boing"addcolor colorRect,cd,rect of btn "statusColor",yellowput "Volume is locked.  Unlock it, or change the preferences to scan." into fld "status"exit mouseUpend ifput the long name of stack home into currentStackput the length of currentStack into it-- strip out the word 窶徭tack窶 and the quotesput char 8 to (it - 1) of currentStack into currentStack-- preserve status of locked/unlocked in the Finderput IsFinderLocked(currentStack) into itWasLockedput false into inoculated --(Home stack not locked)-- lock down the Home stackif itWasLocked is not true thenif okToInoculate is true thenput "Locking the Home stack..." into fld "status"put script of stack currentStack into quarantinescrutinize currentStack  -- in case it hasn't been checked yetdo "SetFinderLock" & quote & currentStack & quote & ",true"if the result is emptythen put true into inoculatedend ifend if-- set the status color to yellow for 窶徭tandby窶addcolor colorRect,cd,rect of btn "statusColor",yellowif targit is "Volume" thenput "Identifying all stacks on" && volPath into fld "status"put "..." into last char of fld "status"set the cursor to "busy"  -- A.K.A. the 窶彙eachball窶 cursor-- get a list of every stack on the selected volumeput GetDir(volPath,"F+","d>0","o=p","t=STAK") into stackListput the number of lines of stackList into stacksFoundelse if targit is "Folder" thenput "Identifying all stacks in" && folPath into fld "status"put "..." into last char of fld "status"set the cursor to "busy"-- get a list of all the stacks in the selected folderput GetDir(folPath,"AND","F" & subfolder,"d>0","o=p","t=STAK") into stackListput the number of lines of stackList into stacksFoundelseput empty into fld "status"put stkPath into stackListput stkPath into fld "stacks"put 1 into stacksFoundend if-- GetDir interprets commas as 窶彈44]窶repeatif stackList contains "[44]" thenput offset("[44]",stackList) into itput "," into char it to it + 3 of stackListelse-- mirror the first 29K to the display listput char 1 to 29000 of stackList into fld "stacks"-- avoid a partial path name on the last lineif length of fld "stacks" is 29000then put empty into last line of fld "stacks"exit repeatend ifend repeatif fld "stacks" is empty thenput "No Stacks Found.  Procedure cancelled." into fld "status"addcolor colorRect,cd,rect of btn "statusColor",greenexit mouseUpelse if stacksFound > 14 thenset style of fld "stacks" to scrollingend ifput "Examining stack" into fld "status"if (stacksFound > 1) then put "s" after fld "status"put ".  So far, so good..." after fld "status"put the userlevel into userlevelHold  -- preserve user level for laterset the userlevel to 5repeat with lineNo = 1 to stacksFound  -- repeat once for each stack foundset the cursor to "busy"put line lineNo of stackList into currentStack-- if the list of stacks exceeds 30K...if the number of lines of fld "stacks" < lineNo thenput line lineNo of stackList into last line of fld "stacks"set the textStyle of last line of fld "stacks" to boldelse-- force display to scroll down if necessaryselect after line lineNo of fld "stacks"-- indicate which stack in the list is currently being examinedset the textStyle of line lineNo of fld "stacks" to boldend ifshowProgress (lineNo / stacksFound)  -- advance the progress barif the long name of this stack is ツャ  -- do not check thyself"stack" && quote & currentStack & quote thenset the textStyle of line lineNo of fld "stacks" to italicnext repeatend if-- avoid the 窶弩here is Scriptable Text Editor?窶 promptcheckLanguageif the result is true then next repeatput script of stack currentStack into quarantine  -- snag scriptscrutinize currentStack  -- do the actual testing for virusesif lowMem is true then  -- low on memoryaddcolor colorRect,cd,rect of btn "statusColor","0,0,0"exit mouseUpend ifend repeatif stillinfectedStacks + IDinfectedStacks < 1 then-- set the status color to green for 窶彗ll clear窶addcolor colorRect,cd,rect of btn "statusColor",greenend if-- create a report for printing/saving as text-- and mirror it to the display windowlock screenput "Operation complete." into fld "status"put "Stacks scanned:" & return before stackListput return & return after stackListput return & return after fld "stacks"set the textStyle of last line of fld "stacks" to plainif okToList thenput "Stacks scanned:" & return before fld "stacks"set the textStyle of line 1 of fld "stacks" to boldelseput empty into fld "stacks"end ifput "merrymas Vaccine 4.1 Report on" && the short date && "at" ツャ&& the short time & return & return before stackListput "merrymas Vaccine 4.1 Report on" && the short date && "at" ツャ&& the short time & return & return before fld "stacks"set the textStyle of line 1 of fld "stacks" to boldset the textStyle of the last char of fld "stacks" to plainset the rect of btn "Bar" to -1,-2,-4,-3set the userlevel to userlevelHold  -- restore original user levelif disinfectedStacks + stillinfectedStacks + IDinfectedStacks = 0 thenput "Whew!  What a relief." & return & return after stackListput "Whew!  What a relief." after fld "stacks"set the textStyle of the last line of fld "stacks" to boldput return & return after fld "stacks"if stacksFound = 1 thenput "The stack 窶œ" & the short name of stack currentStack ツャafter stackListput "窶 was not infected." after stackListput "The stack 窶œ" & the short name of stack currentStack ツャafter fld "stacks"put "窶 was not infected." after fld "stacks"elseput "None of the" && stacksFound && ツャ"stacks checked were infected." after stackListput "None of the" && stacksFound && ツャ"stacks checked were infected." after fld "stacks"end ifelse if disinfectedStacks > 0 thenput "The following stacks were infected and" & return & ツャ"have been successfully disinfected: " ツャ& return & infected & return & return after stackListput "The following stacks were infected and" after fld "stacks"set the textStyle of the last line of fld "stacks" to boldput return & "have been successfully disinfected: " after fld "stacks"set the textStyle of the last char of fld "stacks" to plainput return & infected & return & return after fld "stacks"end ifif stillinfectedStacks > 0 thenput "The following stacks are infected and" & return & ツャ"could not be disinfected:" after stackListput return after fld "stacks"set the textStyle of the last char of fld "stacks" to boldput "The following stacks are infected and" & return & ツャ"could not be disinfected:" into the last char of fld "stacks"set the textStyle of the last char of fld "stacks" to plainif item 5 of GetVInfo(volPath) is true then  -- if disk lockedput volPath into itput "窶 is locked" into last char of itput return & "because 窶œ" & it before last char of stackListput return & "because 窶œ" & it before last char of fld "stacks"end ifput stillinfected & return & return after stackListput stillinfected & return & return after fld "stacks"end ifif IDinfectedStacks > 0 thenset the textStyle of the last char of fld "stacks" to boldput "The following stacks are infected with" & return & ツャ"the 窶廬ndependance Day窶 virus and" & return & ツャ"could not be disinfected:" after stackListput "The following stacks are infected with" & return & ツャ"the 窶廬ndependance Day窶 virus and" & return & ツャ"could not be disinfected:" after fld "stacks"set the textStyle of the last char of fld "stacks" to plainput IDinfected & return & "You are strongly encouraged to remove" & ツャreturn & "the above stacks. Replace them with" & return & ツャ"originals or backups if possible." after stackListput IDinfected & return after fld "stacks"set the textStyle of the last char of fld "stacks" to boldput "You are strongly encouraged to remove" & return & ツャ"the above stacks. Replace them with" & return & ツャ"originals or backups if possible." after fld "stacks"end ifif okToCompact thenset numberFormat to "0"put return & return & bytesCompacted / 1024 ツャ& "K of disk space was recovered by compacting." after stackListput return & return & bytesCompacted / 1024 ツャ& "K of disk space was recovered by compacting." after fld "stacks"set the textStyle of the last line of fld "stacks" to plainend ifif inoculated then --(locked)put return & return & "The Home stack is now locked." after stackListput return & return & "The Home stack is now locked." after fld "stacks"end ifset style of fld "stacks" to scrollingput return after fld "stacks"select after last line of fld "stacks"show btn "Print Report"show btn "Save as text窶ヲ"send colorMe to this cdplay "Lore"end mouseUpon checkLanguageglobal currentStack, lineNoif the scriptingLanguage of stack currentStack 竕  "HyperTalk" thenset the textStyle of line lineNo of fld "stacks" to italicreturn trueelsereturn falseend ifend checkLanguage</script>
  167.     </part>
  168.     <part>
  169.         <id>26</id>
  170.         <type>button</type>
  171.         <visible> <true /> </visible>
  172.         <reserved5> 0 </reserved5>
  173.         <reserved4> 0 </reserved4>
  174.         <reserved3> 0 </reserved3>
  175.         <reserved2> 0 </reserved2>
  176.         <reserved1> 0 </reserved1>
  177.         <enabled> <true /> </enabled>
  178.         <rect>
  179.             <left>384</left>
  180.             <top>292</top>
  181.             <right>504</right>
  182.             <bottom>313</bottom>
  183.         </rect>
  184.         <style>rectangle</style>
  185.         <showName> <true /> </showName>
  186.         <highlight> <false /> </highlight>
  187.         <autoHighlight> <true /> </autoHighlight>
  188.         <sharedHighlight> <false /> </sharedHighlight>
  189.         <family>0</family>
  190.         <titleWidth>0</titleWidth>
  191.         <icon>0</icon>
  192.         <textAlign>center</textAlign>
  193.         <font>Times</font>
  194.         <textSize>14</textSize>
  195.         <textStyle>plain</textStyle>
  196.         <name>Scan Application</name>
  197.         <script>on mouseDownplay "click"end mouseDownon mouseUpglobal stillinfectedStacks, IDinfectedStacks, blinkInfected, green, yellowset cursor to "busy"lock screeninitialize  -- setup misc. fields & variablesput empty into fld "stacks"put "Selecting application to scan..." into fld "status"hide btn "Print Report"hide btn "Save as text窶ヲ"-- clear the white holes left by the buttonssend colorMe to this cdunlock screenanswer file "Select an application to examine" of type applicationput empty into fld "status"set cursor to "busy"put it into fld "stacks"-- get the volume (drive) nameput char 1 to offset(":",it) of it into volPathif volPath is empty then  -- if cancelledput "No selection made. Procedure cancelled." into fld "status"exit mouseUpend ifif fld "stacks" is empty thenput "No applications found.  Procedure cancelled." into fld "status"exit mouseUpend if-- temporarily set status color to yellow for 窶徭tandby窶addcolor colorRect,cd,rect of btn "statusColor",yellowput "Examining application.  So far, so good..." into fld "status"put the userlevel into userlevelHold  -- preserve user level for laterset the userlevel to 5put line 1 of fld "stacks" into currentStackopen file currentStack  -- open it as a text fileif the result is empty then-- allocate 1/3 of available memory to check viruses withput the heapspace div 3 into chunkSize-- look for at least 32K to work inif chunkSize < 32768 thenclose file currentStackput "Insufficient memory for scanning." into fld "status"play "boing"answer "Insufficient memory for scanning." with "Quit" or "OK"if it is "OK" then-- clear the status coloraddcolor colorRect,cd,rect of btn "statusColor","0,0,0"exit mouseUpelsedoMenu "Quit HyperCard", "File"exit mouseUpend ifend if-- get the size of the target applicationget GetFInfo(currentStack)if word 1 of it is "Error" thenput "GetFInfo XFCN" && the result into massageplay "boing"answer massageexit mouseUpelseput item 7 of it into appSizeend if-- initialize test result variablesput false into xmasput false into pickleput false into clone1put false into clone2put false into clone3put false into clone4put false into clone5put false into clone6put false into clone7put false into clone8put false into clone9put false into ID1put false into ID2put false into ID3put false into blink1put false into blink2put false into blink3put false into blink4-- lastLine is used to avoid splitting virus signature stringsput empty into lastLine-- determine the number of passes needed to check the whole appput (the trunc of (appSize / chunkSize)) + 1 into umteenrepeat umteen timesset cursor to busyread from file currentStack for chunkSizeif the result 竕  empty thenput the result into massageplay "boing"answer massageexit mouseUpend if-- check for all the different viruses hereput checkAppDNA(lastLine & it) into resultzif xmas   is false then put item  1 of resultz into xmasif pickle is false then put item  2 of resultz into pickleif clone1 is false then put item  3 of resultz into clone1if clone2 is false then put item  4 of resultz into clone2if clone3 is false then put item  5 of resultz into clone3if clone4 is false then put item  6 of resultz into clone4if clone5 is false then put item  7 of resultz into clone5if clone6 is false then put item  8 of resultz into clone6if clone7 is false then put item  9 of resultz into clone7if clone8 is false then put item 10 of resultz into clone8if clone9 is false then put item 11 of resultz into clone9if ID1    is false then put item 12 of resultz into ID1if ID2    is false then put item 13 of resultz into ID2if ID3    is false then put item 14 of resultz into ID3if blink1 is false then put item 15 of resultz into blink1if blink2 is false then put item 16 of resultz into blink2if blink3 is false then put item 17 of resultz into blink3if blink4 is false then put item 18 of resultz into blink4if xmas is true ツャor pickle is true ツャor (clone1 is true and clone2 is true and clone3 and ツャclone4 is true and clone5 is true and clone6 and ツャclone7 is true and clone8 is true and clone9 is true) thensoundTheAlarmput "Infection detected!" into fld "status"put 1 into stillinfectedStacksexit repeatend ifif ID1 is true and ID2 is true and ID3 is true thensoundTheAlarmput "Infection detected!" into fld "status"put 1 into IDinfectedStacksexit repeatend ifif  blink1 is true and blink2 is true ツャand blink3 is true and blink4 is true thensoundTheAlarmput "Infection detected!" into fld "status"put 1 into blinkInfectedexit repeatend ifput the length of it into L-- grab the last 50 characters readput char (L - 50) to L of it into lastLineend repeatclose file currentStackend ifput return & return after fld "stacks"if stillinfectedStacks + IDinfectedStacks + blinkInfected < 1 then-- set status color to green for 窶彗ll clear窶addcolor colorRect,cd,rect of btn "statusColor",greenplay "Lore"put "Whew!  What a relief." after fld "stacks"set the textStyle of the last line of fld "stacks" to boldput return & return & "The application was not infected." ツャafter fld "stacks"end ifput "Examination complete." into fld "status"set the userlevel to userlevelHold  -- restore original user levelif stillinfectedStacks > 0 thenput "WARNING! The above application is infected! " after fld "stacks"set the textStyle of the last line of fld "stacks" to boldset the textStyle of the last char of fld "stacks" to plainput return & "You are advised to remove this application" && ツャ"and notify the person or organization where the application" && ツャ"originated that it appears to be" & return & "infected with" && ツャ"a strain of the " after fld "stacks"if pickle thenput "窶徘ickle窶 virus." after fld "stacks"elseput "窶徇erryxmas窶 virus." after fld "stacks"end ifend ifif IDinfectedStacks > 0 thenput "WARNING! The above application is infected! " after fld "stacks"set the textStyle of the last line of fld "stacks" to boldset the textStyle of the last char of fld "stacks" to plainput return & "You are advised to remove this application" && ツャ"and notify the person or organization where the application" && ツャ"originated that it appears to be" & return & "infected with" && ツャ"the 窶廬ndependance Day窶 virus." after fld "stacks"end ifif blinkInfected > 0 thenput "WARNING! The above application is infected! " after fld "stacks"set the textStyle of the last line of fld "stacks" to boldset the textStyle of the last char of fld "stacks" to plainput return & "You are advised to remove this application" && ツャ"and notify the person or organization where the application" && ツャ"originated that it appears to be" & return & "infected with" && ツャ"the 窶廝link窶 virus." after fld "stacks"end ifend mouseUp</script>
  198.     </part>
  199.     <name>Main</name>
  200.     <script>-- help the colors snap up if HC is launched with Vaccineon startUplock screenpass startUpend startUpon openStackglobal currentStack, quarantine, sweepMode, disinfectedStacks, ツャstillinfectedStacks, IDinfectedStacks, okToCompact, targit, subfolder, ツャokToInoculate, okToList, colorized, green, yellow, redset the cursor to "busy"AddColor installif the result is empty thenput true into colorizedelseput the result into itplay "boing"answer "AddColor" && itput false into colorizedend ifsend colorMe to this cd  -- activate the color layer-- test for Mac Plus or 9" monitorif word 1 of monitorConfig("CardWindow","noDialog") = "You" ツャor last item of line 1 of monitorConfig("CardWindow","noDialog") ツャ= 342 thenset loc  of cd window to 0,20  -- position for 9" monitorsset rect of cd window to 0,20,512,340  -- make full screenend ifif the version of HyperCard < 2.2 thenplay "boing"answer "This stack requires HyperCard 2.2 or later."end if-- create a window for my pictureif "color" is in monitorConfig("CardWindow","noDialog") ツャor "RGB"   is in monitorConfig("CardWindow","noDialog") thenpicture "Bill",resource,shadow,falseif the result is empty thenset the rect of window "Bill" to 206,110,306,210set the dithering of window "bill" to trueelseanswer the resultend ifend ifset the cursor to "busy"put empty into fld "stacks"  -- clear out the report windowput empty into stackList  -- clear out the stack list/report variablehide btn "Print Report"hide btn "Save as text窶ヲ"minimizeMenus-- set values for status colorsput "000,65535,000" into greenput "65535,65535,0" into yellowput "65535,000,000" into red-- conduct self test for viruses---- change status color to yellow for 窶徭tandby窶addcolor colorRect,cd,rect of btn "statusColor",yellowset the cursor to "busy"put "Performing self check..." into fld "status"put the long name of this stack into currentStackput the length of currentStack into it-- strip out the word 窶徭tack窶 and the quotesput char 8 to (it - 1) of currentStack into currentStackput script of stack currentStack into quarantine-- set flag for Disinfection mode vs. Scan Onlyput "search & destroy" into sweepModeput true into okToCompact  -- OK to compact free spaceput true into OKtoOpen  -- OK to actually go to the target stackput zero into disinfectedStacksput zero into stillinfectedStacksscrutinize currentStack  -- check thyself for virusesif disinfectedStacks > 0 then-- change status color to green for 窶彗ll clear窶addcolor colorRect,cd,rect of btn "statusColor",greenput "The self check procedure detected an infection in this stack," ツャ& return & "but it was immediately eliminated." & return ツャ& return & "There is no guarantee that this stack will not become" ツャ& return & "infected again, but for now you may continue using this stack" ツャ& return & "with confidence that it will not spread viruses 窶”" ツャ&& "only eliminate them." into fld "Stacks"put "Ready" into fld "status"end ifif stillinfectedStacks > 0 thensoundTheAlarmput "The self check procedure detected an infection in this stack," ツャ& return & "and for some unknown reason was unable to disinfect itself." ツャ& return & "Discard this stack and obtain a fresh copy." ツャ& return & "It's probably a good idea to get a fresh Home stack too." ツャinto fld "Stacks"end if--Restore preferencesif the hilite of bg btn "An Individual Stack" of cd 1 of bg "Preferences" is truethen put "Stack" into targitif the hilite of bg btn "All Stacks in a Folder" of cd 1 of bg "Preferences" is true thenput "Folder" into targitif the hilite of bg btn "Include sub-folders" of cd 1 of bg "Preferences" is truethen put "+" into subfolderend ifif the hilite of bg btn "An Entire Volume" of cd 1 of bg "Preferences" is truethen put "Volume" into targitif the hilite of bg btn "Perform a passive scan of stacks on locked media" ツャof cd 1 of bg "Preferences" is true thenput "scan only" into sweepModeelseput "search & destroy" into sweepModeend ifif the hilite of bg btn "Compact examined stacks to recover free space" ツャof cd 1 of bg "Preferences" is true thenput true into okToCompactelseput false into okToCompactend ifif the hilite of bg btn "Include the list of scanned stacks in the report" ツャof cd 1 of bg "Preferences" is true thenput true into okToListelseput false into okToListend ifif the hilite of bg btn "Lock the Home stack against future infections" ツャof cd 1 of bg "Preferences" is true thenput true into okToInoculateelseput false into okToInoculateend ifpass openStackend openStackon colorMeAddColor colorCard,stamp,0  -- activate/refresh the color layerend colorMeon initializeglobal stackList, infected, disinfectedStacks, stillinfectedStacks, ツャstillInfected, IDinfectedStacks, IDinfected, bytesCompacted, ツャblinkInfectedaddcolor changeObjectColor,cd,1,"0,0,0"  -- set status color to blacksend colorMe to this cd  -- refresh color layerput "Ready" into fld "status"if "Report" is not in line 1 of fld "Stacks"  -- if there is not a report in the windowthen set the style of fld "stacks" to opaque  -- remove the scroll barset the rect of btn "Bar" to -1,-2,-4,-3  -- hide the progress barput empty into stackListput empty into infected  -- list of infected stacksput zero  into disinfectedStacks  -- counts stacks disinfectedput zero  into stillinfectedStacks  -- counts stacks still infectedput empty into stillInfected  -- list of remaining infected stacksput zero  into IDinfectedStacks  -- counts stacks infected w/Independance Dayput empty into IDinfected  -- list of Independance Day infected stacksput empty into blinkInfected  -- counts Blink infected stacksput zero  into bytesCompacted  -- total bytes saved by compactingend initializeon minimizeMenuslock screen  -- avoid the cascade of disappearing menusIf there is a menu "Tools"   then delete menu "Tools"If there is a menu "Objects" then delete menu "Objects"If there is a menu "Fonts"   then delete menu "Fonts"If there is a menu "Style"   then delete menu "Style"If there is a menu "Color"   then delete menu "Color"if there is a menuitem "Delete Stack..." of menu "Edit"then   delete menuitem "Delete Stack..." of menu "Edit"if there is a menuitem "New Card"        of menu "Edit"then   delete menuitem "New Card"        of menu "Edit"if there is a menuitem "Delete Card"     of menu "Edit"then   delete menuitem "Delete Card"     of menu "Edit"if there is a menuitem "Cut Card"        of menu "Edit"then   delete menuitem "Cut Card"        of menu "Edit"if there is a menuitem "Copy Card"       of menu "Edit"then   delete menuitem "Copy Card"       of menu "Edit"unlock screenend minimizeMenus-- provide an easy way for me to reset the menubar-- by toggling the menubar off and on again with command-space baron show whatToShowif whatToShow = "menubar" then reset menubarpass showend showon scrutinize stackNameglobal sweepMode, quarantine, guillotined, okToCompact, lineNo, ツャinfected, bytesCompacted, disinfectedStacks, stillinfectedStacks, ツャvolPath, stillInfected, IDinfectedStacks, IDinfected, red, lowMem, ツャblinkInfected-- preserve the status of being locked/unlocked in the Finderput IsFinderLocked(stackName) into itWasLocked-- see if IsFinderLocked failed (which it sometimes does)if (itWasLocked is not true) and (ItWasLocked is not false) thenput true into ItWasLocked  -- assume it was lockedend if-- see if the stack needs to be unlocked in the Finderif (sweepMode is not "scan only") and ツャ(DNACheck(quarantine) ツャ  -- the stack fails the virus testor (okToCompact and (the freeSize of stack stackName > 0))) thenif itWasLocked then  -- if locked, pick the lockdo "SetFinderLock" & quote & stackName & quote & ",false"end ifend if-- check for 窶廬ndependance Day窶 [sic]---- OKtoOpen is a flag that says whether or not it is safe-- to go to a stack. The default is set here to true.put true into OKtoOpen-- avoid opening Vaccine itselfif the long name of this stack 竕  "stack" && quote & stackName & quote thenput the size of stack stackName into stackSizeopen file stackName  -- open it as a text fileif the result is empty then-- allocate 1/4 of available memory to check viruses withput the heapspace div 4 into chunkSize-- look for at least 32K to work input false into lowMem  -- low memory flagif chunkSize < 32768 thenclose file stackNameanswer "Insufficient memory for scanning." with "Quit" or "OK"if it is "Quit" then doMenu "Quit HyperCard", "File"put true into lowMemexit scrutinizeend ifput false into criteria1put false into criteria2put false into criteria3put empty into lastLineput (the trunc of (stackSize / chunkSize)) + 1 into umteenrepeat umteen timesset cursor to busyread from file stackName for chunkSizeput the length of it into Lput checkID(lastLine & it) into resultz-- grab the last 50 characters readput char (L - 50) to L of it into lastLineif criteria1 is false then put item 1 of resultz into criteria1if criteria2 is false then put item 2 of resultz into criteria2if criteria3 is false then put item 3 of resultz into criteria3if criteria1 is true and criteria2 is true and criteria3 is true thenadd 1 to IDinfectedStacksput false into OKtoOpen  -- make sure we don窶冲 go to this stackput return & space && stackName after IDinfected-- sound the alarm for the first detected infectionif disinfectedStacks + stillinfectedStacks = 0 ツャand IDinfectedStacks = 1 thensoundTheAlarmput "1 infection detected.  Continuing..." into fld "status"elseput disinfectedStacks + stillinfectedStacks + IDinfectedStacks ツャ&& "infections detected.  Continuing..." into fld "status"end ifexit repeatend ifend repeatend ifclose file stackNameend if-- if the stack fails the virus check...if DNACheck(quarantine) thenif item 5 of GetVInfo(volPath) is false then  -- if volume unlockedset the cursor to "busy"convertV1toV2(stackName)  -- convert v1.x stacks to 2.x formatput the cantModify of stack stackName ツャinto cantModifyHold  -- preserve modify setting for restorationset the cantModify of stack stackName to false-- replace the virus code with spaces-- to help reduce 窶彷alse positives窶 from commercial utilitiesput lostInSpaces1(quarantine) into quarantineput lostInSpaces2(quarantine) into quarantine-- put the script back sans the lines where the virus wasset script of stack stackName to quarantineif the result is empty thenif disinfectedStacks > 0 then put return after infectedadd 1 to disinfectedStacksput space && stackName after infectedelseif stillinfectedStacks > 0 then put return after stillinfectedadd 1 to stillinfectedStacksput false into OKtoOpen  -- make sure we don窶冲 go to this stackput space && stackName after stillinfectedend if-- remove the option-spaces used to clean up the data fork-- for the benefit of commercial virus utilitiesrepeat with r = the number of lines of quarantine down to 1if the first char of line r of quarantine = "ツ " ツャand the last char of line r of quarantine = "ツ "then put empty into line r of quarantineif the first char of line r - 1 of quarantine = "ツ " ツャand the last char of line r - 1 of quarantine = "ツ "then put empty into line r - 1 of quarantine-- eliminate consecutive blank linesif line r of quarantine is empty ツャand line r - 1 of quarantine is emptythen delete line r of quarantineend repeat-- replace the script with the optimized versionset script of stack stackName to quarantine-- restore the original cantModify settingset the cantModify of stack stackName to cantModifyHold-- use underlining to designate that this is a disinfected stackset the textStyle of line lineNo of fld "stacks" to underlineelseadd 1 to stillinfectedStacksput false into OKtoOpen  -- make sure we don窶冲 go to this stackput return & space && stackName after stillinfectedend if-- perform a background check on this candidateif OKtoOpen thenpush cd  -- remember where we arelock messages  -- avoid open messages, etc.lock screengo stack stackName  -- go to the stackgo bg 1repeat with r = 1 to the number of backgrounds of this stackput script of this bg into quarantineput lostInSpaces2(quarantine) into quarantineset script of this bg to quarantinego next bgend repeatpop cd  -- return to where we wereunlock messagesunlock screenend if-- end background check on this candidate-- sound the alarm for the first detected infectionif disinfectedStacks + stillinfectedStacks = 1 ツャand IDinfectedStacks = 0 thensoundTheAlarmput "1 infection detected.  Continuing..." into fld "status"elseput disinfectedStacks + stillinfectedStacks + IDinfectedStacks ツャ&& "infections detected.  Continuing..." into fld "status"end ifend if-- begin check for the Blink virusput zero into blinkInfectedif OKtoOpen thenpush cd  -- remember where we arelock messages  -- avoid open messages, etc.lock screen-- preserve the cantModify setting for restorationput the cantModify of stack stackName into cantModifyHoldgo stack stackName  -- go to the stackgo bg 1repeat with r = the number of backgrounds of this stack down to 0if r = 0 thenif the short name of this stack = "Home" thenput script of this stack into quarantineelseexit repeatend ifelseput script of this bg into quarantineend ifif blinkCheck(quarantine) then-- script is infected - add 1 to counteradd 1 to blinkInfectedif item 5 of GetVInfo(volPath) is false then  -- if volume unlockedset the cursor to "busy"convertV1toV2(stackName)  -- convert v1.x stacks to 2.x formatset the cantModify of stack stackName to false-- replace the virus code with option-spacesput lostInSpaces3(quarantine) into quarantineif r = 0 thenset script of this stack to quarantineelseset script of this bg to quarantineend ifif the result is empty then-- remove the option-spaces used to clean up the data fork-- for the benefit of commercial virus utilitiesrepeat with r = the number of lines of quarantine down to 1if the first char of line r of quarantine = "ツ " ツャand the last char of line r of quarantine = "ツ "then put empty into line r of quarantineif the first char of line r - 1 of quarantine = "ツ " ツャand the last char of line r - 1 of quarantine = "ツ "then put empty into line r - 1 of quarantine-- get rid of all those stupid returnsif line r of quarantine is empty ツャand line r - 1 of quarantine is emptythen delete line r of quarantineend repeatif r = 0 thenset script of this stack to quarantineelseset script of this bg to quarantineend ifif blinkInfected = 1 thenadd 1 to disinfectedStacksif disinfectedStacks > 0 then put return after infectedput space && stackName after infectedend ifelseif blinkInfected = 1 thenadd 1 to stillinfectedStacksput false into OKtoOpenif stillinfectedStacks > 0 then put return after stillinfectedput space && stackName after stillinfectedend ifend ifelseif blinkInfected = 1 thenadd 1 to stillinfectedStacksput false into OKtoOpenif stillinfectedStacks > 0 then put return after stillinfectedput space && stackName after stillinfectedend ifend ifend ifgo next bgend repeatpop cd  -- return to where we were-- restore the original cantModify settingif blinkInfected > 0 and item 5 of GetVInfo(volPath) is false  -- if volume unlockedthen set the cantModify of stack stackName to cantModifyHoldunlock messagesunlock screen-- sound the alarm for the first detected infectionif disinfectedStacks + stillinfectedStacks + IDinfectedStacks = 1 ツャand blinkInfected > 0 thensoundTheAlarm-- use underlining to designate that this is a disinfected stackset the textStyle of line lineNo of fld "stacks" to underlineput "1 infection detected.  Continuing..." into fld "status"-- keep from tripping the alarm againput zero into blinkInfectedelse if disinfectedStacks + stillinfectedStacks + IDinfectedStacks > 1 thenif stackName is in infectedthen set the textStyle of line lineNo of fld "stacks" to underlineput disinfectedStacks + stillinfectedStacks + IDinfectedStacks ツャ&& "infections detected.  Continuing..." into fld "status"end ifend if-- end check for Blinkif okToCompact and (the freeSize of stack stackName > 0) ツャand item 5 of GetVInfo(volPath) is false then  -- volume is unlockedconvertV1toV2(stackName)  -- convert v1.x stacks to 2.x formatadd the freeSize of stack stackName to bytesCompactedif (stackName is not in the stacksInUse) ツャand (itWasLocked is not true) ツャand (the cantModify of stack stackName is false) thenlock messageslock screenpush cdgo to stack stackNamedoMenu "Compact stack", "File"pop cdunlock messagesunlock screenend if-- decrement the counter with any space that would not compactsubtract the freeSize of stack stackName from bytesCompactedend if-- restore the stack to it's original Finder locked statusif itWasLocked thendo "SetFinderLock" & quote & stackName & quote & ",true"end ifif OKtoOpen then-- unbold the current line in the listif the number of lines of fld "stacks" < lineNo then  -- if list exceeds 30Kset the textStyle of last line of fld "stacks" to plainelseif the textStyle of line lineNo of fld "stacks" 竕  underlinethen set the textStyle of line lineNo of fld "stacks" to plainend ifend ifset the textStyle of line lineNo + 1 of fld "stacks" to boldend scrutinizeon idle-- do NOT pass idleend idleon doMenusend (the params) to HyperCard-- do NOT pass doMenuend doMenu-- convert HyperCard version 1.x stacks to version 2.x formaton convertV1toV2 stackNameif char 1 to 2 of item 4 of the version of stack stackName < 2 thenlock messageslock screenpush cdgo stack stackNamechoose browse tooldoMenu "Convert Stack...", "File" without dialogpop cdunlock screenunlock messagesend ifend convertV1toV2on soundTheAlarmglobal redplay "Klaxon"play "Klaxon"-- change the status color to red for 窶廣lert!窶addcolor changeObjectColor,cd,1,redsend colorMe to this cd  -- refresh the color layerend soundTheAlarmon depickle  -- nuke the pickled partsglobal currentStackKillRes "XFCN","3000",currentStackKillRes "XFCN","4000",currentStackKillRes "TEXT","6000",currentStackKillRes "XCMD","7000",currentStackKillRes "XFCN","8000",currentStackKillRes "XCMD","8500",currentStackKillRes "XCMD","9500",currentStackend depickleon suspendStackreset menubarpass suspendStackend suspendStackon resumeStackminimizeMenuspass resumeStackend resumeStackon closeStacklock screengo cd "Main"hide btn "Print Report"hide btn "Save as text窶ヲ"put empty into fld "stacks"set style of fld "stacks" to opaque  -- hide the scroll barset the rect of btn "Bar" to -1,-2,-4,-3  -- hide the progress bar-- preload opening messageput "Patience grasshopper..." into fld "status"addcolor changeObjectColor,cd,1,"0,0,0"  -- set status color to blackAddColor removereset menubarpass closeStackend closeStack</script>
  201. </background>
  202.